<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org"
      xmlns:sec="http://www.thymeleaf.org/thymeleaf-extras-springsecurity4">
<head>
  <meta charset="UTF-8">
  <title>网站首页</title>

  <!-- Bootstrap core CSS -->
  <link th:href="@{/css/bootstrap.min.css}" rel="stylesheet">

  <link rel="icon" th:href="@{/img/security.png}">
</head>
<body>
<div class="container">
  <div class="card" style="width: 18rem;">
    <div class="card-body">
      <p class="card-text">
        欢迎 <span th:text="${realName}"></span> , <span th:text="${username}"></span>
      </p>
    </div>
  </div>
  <!-- Content here -->
  以下是网站的功能：
  <div class="list-group col-sm-4">
    <a th:href="@{/product/add}" class="list-group-item list-group-item-action"
       sec:authorize="hasAuthority('ROLE_PRODUCT_ADD')">商品添加</a>
    <a th:href="@{/product/update}" class="list-group-item list-group-item-action"
       sec:authorize="hasAuthority('ROLE_PRODUCT_UPDATE')">商品修改</a>
    <a th:href="@{/product/list}" class="list-group-item list-group-item-action"
       sec:authorize="hasAuthority('ROLE_PRODUCT_LIST')">商品查询</a>
    <a th:href="@{/product/delete}" class="list-group-item list-group-item-action"
       sec:authorize="hasAuthority('ROLE_PRODUCT_DELETE')">商品删除</a>
  </div>
  <br/>
<!--  <a th:href="@{/logout}" class="btn btn-primary" role="button">退出</a>-->
  <form th:action="@{/logout}" method="post">
    <button type="submit" class="btn btn-primary">退出</button>
  </form>
</div>
</body>
</html>